// import * as mars3d from 'mars3d'
import { Mars3d } from '../components/utils/initMap'
export let marker = {
    image: '',
    opacity: 1,
    scale: 1,
    // horizontalOrigin: Mars3d.Cesium.HorizontalOrigin.CENTER,
    // verticalOrigin: Mars3d.Cesium.VerticalOrigin.BOTTOM,
    scaleByDistance: true,
    distanceDisplayCondition: true,
    clampToGround: true,
    scaleByDistance_far: 5000,
    scaleByDistance_farValue: 0.0001,
    scaleByDistance_near: 1,
    scaleByDistance_nearValue: 1,
    distanceDisplayCondition_near: 1,
    distanceDisplayCondition_far: 5000,
    label: {
        specification: '',
        text: '',
        font_size: 24,
        color: '#FF0000',
        outline: true,
        outlineColor: '#000000',
        font_family: '楷体',
        opacity: 1,
        pixelOffsetY: 30,
        scaleByDistance: true,
        distanceDisplayCondition: true,
        scaleByDistance_far: 5000,
        scaleByDistance_farValue: 0.0001,
        scaleByDistance_near: 1,
        scaleByDistance_nearValue: 1,
        distanceDisplayCondition_near: 1,
        distanceDisplayCondition_far: 5000
    }
}
export let plane = {
    color: '',
    width: 2,
    opacity: 0.5,
    outline: true,
    outlineColor: '',
    outlineWidth: 2.0,
    clampToGround: '',
    outlineOpacity: 1,
    fill: false,
    materialType: 'Color',
    // height: 0,
    // rotationDegree: 180,
    label: {
        text: '0',
        font_size: 14,
        color: '#FF0000',
        outline: true,
        outlineColor: '#000000',
        font_family: '楷体',
        opacity: 1,
        clampToGround: true
        // distanceDisplayCondition: true
    }
}
export let box = {
    color: '#00ff00',
    opacity: 0.6,
    dimensions_x: 1000.0,
    dimensions_y: 1000.0,
    dimensions_z: 1000.0
}
export let ellipse = {
    semiMajorAxis: 1500, //长半轴 半径
    semiMinorAxis: 900, // 短半轴 半径
    diffHeight: 1000.0,
    color: '#00ff00',
    opacity: 0.3,
    rotationDegree: 45
}
export function modify(data, prop) {
    //修改
    // console.log(data)
    // propertys(data)
    // return
    // data.materialType = 'Color'

    setTimeout(() => {
        if (prop == 'box') {
            box = data
        } else if (prop == 'ellipse') {
            ellipse = data
        } else if (prop == 'plane') {
            plane = data
        } else if (prop == 'marker') {
            marker = data
            // console.log(data, prop, '111111111111111111111')
        }
    }, 300)
}
// function propertys(params) {
//     delete params.area
//     delete params.area1
//     delete params.distance
//     delete params.materialType
//     delete params.zIndex
//     delete params.tiltAreaUnit
//     delete params.areaUnit
//     delete params.tilt
//     delete params.name
// }
